<script setup lang="ts">
import { onMounted } from 'vue';
import { theme } from 'ant-design-vue';
import { Conversations } from 'ant-design-x-vue';
import type { ConversationsProps } from 'ant-design-x-vue';
import { computed } from 'vue';
import { getConversationList } from '@/utils/app.ts'
defineOptions({ name: 'AXConversationsBasicSetup' });

const items: ConversationsProps['items'] = Array.from({ length: 4 }).map((_, index) => ({
    key: `item${index + 1}`,
    label: `Conversation Item ${index + 1}`,
    disabled: index === 3,
}));
const { token } = theme.useToken();

// Customize the style of the container
const style = computed(() => ({
    width: '256px',
    background: token.value.colorBgContainer,
    borderRadius: token.value.borderRadius,
}));
const getList = () => {
    getConversationList({ user: '', last_id: '', limit: '10' }).then((data) => {
        console.log('data------', data)
    })
}
// 获取字典数据
onMounted(() => {
    getList()
});
</script>
<template>
    <Conversations :items="items" default-active-key="item1" :style="style" />
</template>